package solysombra.api.resources;
import java.net.URI;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.core.Response.ResponseBuilder;
import org.jboss.resteasy.spi.BadRequestException;
import org.jboss.resteasy.spi.NotFoundException;
import solysombra.domain.Place;
import solysombra.domain.PlaceList;
@Path("/places/{user}/")
public class PlaceResource {
public static PlaceResource _instance=null;
private PlaceResource(){}
public static PlaceResource getInstance()
{
if(_instance==null)
_instance=new PlaceResource();
return _instance;
}
//NO
@GET
@Produces("application/json")
public List<Place> getAllPlaces(@PathParam("user") String user)
{
List<Place> result=null;
PlaceList placelist = PlaceListResource.getInstance().getPlaces(user);
if(placelist!=null){
result=placelist.getPlaces();
}else
throw new NotFoundException("placelist"+user+" not found");
return result;
// TODO: Implement method
}
// Quizas
// Quizas
}